//
//  UIView+Additions.h
//  OCStarterProject
//
//  Created by huaya on 2025/10/2.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIView (Additions)

/// 设置圆角
- (void)setCornerRadius:(CGFloat)radius;

/// 设置边框
- (void)setBorderWidth:(CGFloat)width color:(UIColor *)color;

/// 设置阴影
- (void)setShadowWithColor:(UIColor *)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(CGFloat)opacity;

/// 添加点击手势
- (void)addTapGestureWithTarget:(id)target action:(SEL)action;

/// 移除所有子视图
- (void)removeAllSubviews;

/// 获取视图的截图
- (UIImage *)snapshotImage;

/// 添加渐变色背景
- (void)addGradientBackgroundWithColors:(NSArray<UIColor *> *)colors locations:(NSArray<NSNumber *> *)locations startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint;

/// 添加抖动动画
- (void)shakeAnimation;

@end

NS_ASSUME_NONNULL_END
